package cn.edu.scau.cmi.chenmiaopeng.adapter;

import java.util.List;

public class StudentSortClassAdapter extends SortUtil implements StudentSortClassTarget{
	public void sortStudent(List<Student> studentList) {  //new function
		Student temp;
		  for(int i=0;i<studentList.size()-1;i++) {  //bubblesort
			  for(int j=0;j<studentList.size()-1-i;j++) {
				  if(studentList.get(j).getStuNumber()>studentList.get(j+1).getStuNumber()) {
					  temp = studentList.get(j);
					  studentList.set(j, studentList.get(j+1));
					  studentList.set(j+1, temp);
				  }
			  }
		  }
	}
}
